#!/bin/bash

set -e

cd "$(dirname "$0")"
. ./os_ver_cli.sh

tester_image=kasmvnctester_${os}:$os_codename${build_tag_for_images}
docker build --build-arg KASMVNC_PACKAGE_DIR="build/${os_codename}" \
  --build-arg BUILD_DEBIAN_REVISION="$build_debian_revision" \
  -t "$tester_image" \
  -f dockerfile.${os}_${os_codename}${build_tag}.test .
docker run -it -p 8443:8443 --rm \
  -e KASMVNC_VERBOSE_LOGGING=$KASMVNC_VERBOSE_LOGGING \
  -e "VNC_USER=foo" -e "VNC_PW=foobar" \
  "$tester_image"
